package com.dhsc.local.dao.impl.khyjgl;

import com.dhsc.domain.khzl.common.DictVo;
import com.dhsc.domain.ywzx.khyjgl.YjshbsqVo;
import com.dhsc.local.dao.khyjgl.IYjspbsqDao;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description:客户佣金管理-佣金审批表申请
 * @Author: CDW
 * @Date: 2023/11/15 15:29
 */
@Repository("yjspbsqDao")
public class YjspbsqDaoImpl implements IYjspbsqDao {

    @Autowired
    private SqlSessionTemplate localSqlSessionTemplate;

    @Override
    public List<YjshbsqVo> queryYjsqbshxx(YjshbsqVo y) {
        return localSqlSessionTemplate.selectList("YjspbsqMapper.queryYjsqbshxx",y);
    }

    @Override
    public List<DictVo> queryYjsqClzt(DictVo d) {
        return localSqlSessionTemplate.selectList("YjspbsqMapper.queryYjsqClzt",d);
    }

    @Override
    public List<DictVo> queryYjsqLx(DictVo d) {
        return localSqlSessionTemplate.selectList("YjspbsqMapper.queryYjsqLx",d);
    }

    @Override
    public List<DictVo> queryYjsqSfxc(DictVo d) {
        return localSqlSessionTemplate.selectList("YjspbsqMapper.queryYjsqSfxc",d);
    }

    @Override
    public int insertKhyjWjxx(YjshbsqVo y) {
        return localSqlSessionTemplate.insert("YjspbsqMapper.insertKhyjWjxx",y);
    }

    @Override
    public int insertKhyjxx(YjshbsqVo y) {
        return localSqlSessionTemplate.insert("YjspbsqMapper.insertKhyjxx",y);
    }

    @Override
    public YjshbsqVo queryYjspsqByid() {
        return localSqlSessionTemplate.selectOne("YjspbsqMapper.queryYjspsqByid");
    }

    @Override
    public int queryYjspsqByidIsExist(YjshbsqVo y) {
        return localSqlSessionTemplate.selectOne("YjspbsqMapper.queryYjspsqByidIsExist");
    }

    @Override
    public List<YjshbsqVo> queryYjsqbsh(YjshbsqVo y) {
        return localSqlSessionTemplate.selectList("YjspbsqMapper.queryYjsqbsh",y);
    }

    @Override
    public int deleteYjspsqxx(YjshbsqVo y) {
        return localSqlSessionTemplate.delete("YjspbsqMapper.deleteYjspsqxx",y);
    }
}
